Search for the Max and Min Value of an Array